<div class="container" id="DeveloperFindPsw">
    <div class="row">
        <div class="col-md-12 col-sm-12">
            <h3 class="text-center" ng-if="PageShow==0">找回密码</h3>
            <h3 class="text-center" ng-if="PageShow==1">请输入{{Email}}的邮箱验证码</h3>
            <h3 class="text-center" ng-if="PageShow==2">请重置密码</h3>
            <div class="row">
                <div class="col-md-10 col-md-offset-2 col-sm-10 col-sm-offset-2">
                    <form class="form-horizontal reg-box" method="post" name="EmailForm" novalidate="novalidate"  ng-if="PageShow==0">
                        <div class="form-group has-feedback" ng-class="{'has-success':EmailForm.Email.$valid,'has-error': EmailForm.Email.$dirty && Developer.email== undefined || EmailForm.Email.$dirty && EmailCheckResult ==0 || EmailCheckResult !=0 && EmailCheckMessage != null}">
                            <label class="col-md-2 col-sm-2 control-label"><em class="must-point">*</em>邮箱：</label>
                            <div class="col-md-6 col-sm-6">
                                <input type="email" class="form-control" name="Email" placeholder="请输入邮箱" required ng-model='Developer.email' ng-change="EmailCheckExists(Developer.email)" >
                                <span class="glyphicon form-control-feedback" aria-hidden="true" ng-class="{'glyphicon-ok':EmailForm.Email.$valid ,'glyphicon-remove':EmailForm.Email.$dirty && Developer.email == undefined || EmailForm.Email.$dirty && EmailCheckResult==0 || EmailCheckResult !=0 && EmailCheckMessage != null}"></span>
                            </div>
                            <div class="col-md-4 message">
                                <span>{{EmailCheckMessage}}</span>
                                <!--<span ng-show="EmailCheckResult!=0">{{EmailCheckMessage}}</span>-->
                            </div>
                        </div>
                        <div class="form-group has-feedback"  ng-class="{'has-success':EmailForm.verifyCode.$valid && ImageCodeVerifyResult==0,'has-error':EmailForm.verifyCode.$invalid && EmailForm.verifyCode.$dirty || ImageCodeVerifyResult != 0 && EmailForm.verifyCode.$dirty }">
                            <label class="col-md-2 col-sm-2 control-label"><em class="must-point">*</em>验证码：</label>
                            <div class="col-md-6 col-sm-6 ">
                                <input type="text" name="verifyCode" class="form-control" placeholder="请输入验证码" required ng-model="Developer.verifyCode" ng-change="VerifyImageCode(Developer)">
                            </div>
                            <div class="col-md-4 col-sm-4 ">
                                <img ng-src="{{img}}" alt="验证码" ng-click="getVerifyImage()" style="width:70px;height:30px;">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-6  col-md-offset-2 col-sm-6  col-sm-offset-2 ">
                                <div class="text-center mt reg-btn">
                                    <button ng-click="getEmailCode(Developer)" class="btn btn-primary" ng-disabled="EmailForm.$invalid || ImageCodeVerifyResult != 0 || EmailCheckResult !=0 && EmailCheckMessage != null || EmailCheckResult == 0">下一步</button>
                                </div>
                            </div>
                        </div>
                    </form>
                    <form class="form-horizontal reg-box" method="post" name="EmailCodeForm" novalidate="novalidate"  ng-if="PageShow==1" >
                        <div class="form-group has-feedback"  ng-class="{'has-success':EmailCodeForm.EmailCode.$valid && EmailCodeVerifyResult ==0,'has-error':EmailCodeForm.EmailCode.$invalid && EmailCodeForm.EmailCode.$dirty || EmailCodeVerifyResult !=0 && EmailCodeForm.EmailCode.$dirty}">
                            <label class="col-md-2 col-sm-2 control-label"><em class="must-point">*</em>邮箱验证码：</label>
                            <div class="col-md-6 col-sm-6">
                                <input type="text" id="EmailCode" name="EmailCode" class="form-control" placeholder="请输入邮箱验证码" required ng-model="Developer.EmailCode" ng-change="verifyEmailCode(Developer)">
                                <span class="glyphicon form-control-feedback" aria-hidden="true" ng-class="{'glyphicon-ok':EmailCodeForm.EmailCode.$valid && EmailCodeVerifyResult ==0,'glyphicon-remove':EmailCodeForm.EmailCode.$invalid&&EmailCodeForm.EmailCode.$dirty || EmailCodeVerifyResult !=0 && EmailCodeForm.EmailCode.$dirty}" ></span>
                            </div>
                            <div class="col-md-4">
                                <span ng-show="EmailCodeVerifyResult!=0 && EmailCodeForm.EmailCode.$dirty">邮箱验证码错误!</span>
                                <!--<button class="btn" ng-click="getEmailCode()" ng-disabled="SecondFlag">{{second==0||second==120?'获取邮箱验证码':'验证码已发送，'+second+'秒有效'}}</button>-->
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-6  col-md-offset-2 col-sm-6  col-sm-offset-2 ">
                                <div class="text-center mt reg-btn">
                                    <button ng-click="submitEmailCode(Developer)" class="btn btn-primary" ng-disabled="EmailCodeForm.$invalid || EmailCodeVerifyResult!=0">下一步</button>
                                </div>
                            </div>
                        </div>
                    </form>
                    <form class="form-horizontal reg-box" method="post" name="PswForm" novalidate="novalidate"  ng-if="PageShow==2" >
                        <div class="form-group has-feedback"  ng-class="{'has-success':PswForm.Password.$valid,'has-error':PswForm.Password.$invalid&&PswForm.Password.$dirty}">
                            <label class="col-md-2 col-sm-2 control-label"><em class="must-point">*</em>新密码：</label>
                            <div class="col-md-6 col-sm-6">
                                <input type="password" id="Password" name="Password" class="form-control" placeholder="请输入新密码" required ng-model="Developer.password">
                                <span class="glyphicon form-control-feedback" aria-hidden="true" ng-class="{'glyphicon-ok':PswForm.Password.$valid,'glyphicon-remove':PswForm.Password.$invalid&&PswForm.Password.$dirty}" ></span>
                            </div>
                            <div class="col-md-4"></div>
                        </div>
                        <div class="form-group has-feedback" ng-class="{'has-success':PswForm.Password.$valid&&PswForm.rePassword.$dirty&&Developer.password==Developer.rePassword,'has-error':PswForm.Password.$valid&&PswForm.rePassword.$dirty&&Developer.password!=Developer.rePassword}">
                            <label class="col-md-2 col-sm-2 control-label"><em class="must-point">*</em>确认新密码：</label>
                            <div class="col-md-6 col-sm-6">
                                <input type="password" name="rePassword" class="form-control" placeholder="请输入确认新密码" required ng-model="Developer.rePassword">
                                <span class="glyphicon form-control-feedback" aria-hidden="true" ng-class="{'glyphicon-ok':PswForm.Password.$valid&&Developer.password==Developer.rePassword&&PswForm.rePassword.$dirty,'glyphicon-remove':PswForm.Password.$valid&&Developer.password!=Developer.rePassword&&PswForm.rePassword.$dirty}" ></span>
                            </div>
                            <div class="col-md-4"><span ng-show="PswForm.Password.$valid&&Developer.password!=Developer.rePassword&&PswForm.rePassword.$dirty">*两次密码输入不一致</span></div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-6  col-md-offset-2 col-sm-6  col-sm-offset-2 ">
                                <div class="text-center mt reg-btn">
                                    <button ng-click="submitPsw(Developer)" class="btn btn-primary" ng-disabled="PswForm.$invalid || Developer.password != Developer.rePassword">重置密码</button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            
        </div>
    </div>
</div>